﻿using AutoMapper;
using HelenServer.UserCenter.Contracts;

namespace HelenServer.UserCenter.Services;

[Injection(typeof(IUserService))]
public class UserService : IUserService
{
    private readonly IDalUserService _service;
    private readonly IGrpcClientFactory _factory;
    private readonly IMapper _mapper;

    public UserService(IDalUserService service, IGrpcClientFactory factory, IMapper mapper)
    {
        _service = service;
        _factory = factory;
        _mapper = mapper;
    }

    public async Task<OperationResult<int>> AddAsync(Operation<UserCreateModel> operation, CancellationToken cancellationToken)
    {
        return await _service.AddAsync(operation, cancellationToken);
    }

    public async Task<OperationResult<int>> AddIdentityRangeAsync(Operation<IEnumerable<UserCreateModel>> operation, CancellationToken cancellationToken = default)
    {
        return await _service.AddIdentityRangeAsync(operation, cancellationToken);
    }

    public async Task<OperationResult<int>> AddRangeAsync(Operation<IEnumerable<UserCreateModel>> operation, CancellationToken cancellationToken)
    {
        return await _service.AddRangeAsync(operation, cancellationToken);
    }

    public Task<bool> DeleteAsync(Operation<string> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<bool> ExistsAsync(Operation<string> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<UserInfoModel> GetAsync(Operation<string> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<IReadOnlyCollection<UserInfoModel>> GetListAsync(Operation<UserSearchModel> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<bool> UpdateAsync(Operation<UserModel> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<bool> UpdatePasswordAsync(Operation<UserPasswordModel> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<bool> UpdateStatusAsync(Operation<UserStatusModel> operation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }
}